package com.hope;

import java.util.Calendar;
import java.util.GregorianCalendar;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.support.v4.app.Fragment;

public class DailyPill extends Fragment {
	DailyPillPagerAdapter pillPagerAdapter;
    ViewPager mViewPager;
	
	public DailyPill() {
        // Empty constructor required for fragment subclasses
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.daily_pill, container, false);
        
        getActivity().setTitle("Daily Pill");
        
        Calendar calendar = GregorianCalendar.getInstance();
        pillPagerAdapter = new DailyPillPagerAdapter(getFragmentManager(), calendar);
        mViewPager = (ViewPager) rootView.findViewById(R.id.pager);
        mViewPager.setAdapter(pillPagerAdapter);
        return rootView;
    }
}